package com.hnqcgczy.sgzShop.dao;


import com.hnqcgczy.sgzShop.vo.TUser;

import java.sql.SQLException;
import java.util.List;

public interface IUserDAO {
    /**
     * 登录方法
     * @param username
     * @param pwd
     * @return
     * @throws SQLException
     */
    public abstract boolean login(String username,String pwd)throws SQLException;
    //修饰符  返回类型 方法名 （参数类型1  参数变量1，参数类型2  参数变量2）抛异常

    /**
     * 注册方法
     * @param tUser
     * @return
     * @throws SQLException
     */
   boolean register(TUser tUser)throws SQLException;


   //根据ID删除
   boolean deleterByID(String tu_id)throws SQLException;
    //更新数据
   boolean update(TUser tUser)throws SQLException;
//根据ID查询
    TUser getUserById(String tu_id)throws SQLException;
    //根据真实姓名查询
    List<TUser> getUserByName(String tu_name)throws SQLException;
    //查询所有用户
    List<TUser> getAll()throws SQLException;

    //分页查询
    List<TUser> getAny(int pageNow,int pageSize)throws SQLException;

    //模糊查询
    List<TUser> queryAny(Object... obj)throws SQLException;




}
